<template>
    <view class="content">
        <view class="nav">
        	<view class="nav-i" :class="{active : type == 0}" @click="chooseNav(0)">全部</view>
        	<view class="nav-i" :class="{active : type == 1}" @click="chooseNav(1)">待支付</view>
        	<view class="nav-i" :class="{active : type == 2}" @click="chooseNav(2)">待发货</view>
        	<view class="nav-i" :class="{active : type == 3}" @click="chooseNav(3)">待收货</view>
			<view class="nav-i" :class="{active : type == 4}" @click="chooseNav(4)">已完成</view>
			<view class="nav-i" :class="{active : type == 5}" @click="chooseNav(5)">售后</view>
        </view>
		
		<view class="box" v-for="(item, index) in 2" :key="index" @click="toDetails(item)">
			<view class="item" v-for="(el, ind) in 2" :key="ind">
				<image src="../../../static/del/5.png" class="img"></image>
				<view class="item-right">
					<view class="name">销售实战派-85节实战秘籍销售实战派-85节实战秘籍</view>
					<view class="sub">共86节</view>
					<view class="item-d">
						<view class="price">
							￥<text class="price-num">2690</text>
						</view>
						<view class="num">x1</view>
					</view>
					<view class="gift">
						<view class="gift-icon">赠</view>
						<view class="gift-text u-line-2">
							《商务情景话术内容展》《商务情景话术内容展》《销冠笔记》《商务情景话术内容展》《商务情景话术内容展》《销冠笔记》
						</view>
					</view>
				</view>
			</view>
			
			<view class="t-price">
				共1套课程 实付款：￥<text class="t-price-num">2690</text>
			</view>
			<view class="down">
				<view>
					<view class="sta">审核成功</view>
				</view>
				
				<view class="u-flex">
					<view class="btn1" @click.stop="toCancel(item)">取消订单</view>
					<view class="btn2" @click.stop="toPay(item)">立即支付</view>
					<!-- <view class="btn1" @click.stop="toLogistics(item)">查看物流</view> -->
					<view class="btn2">确认收货</view>
					<!-- <view class="btn1" @click.stop="toAfter(item)">售后</view> -->
					<!-- <view class="btn1" @click.stop="toRate(item)">立即评价</view> -->
					<!-- <view class="btn1" @click.stop="toExpress(item)">完善快递信息</view> -->
				</view>
			</view>
			<view class="reason u-line-1">
				审核失败原因：商品已经拆封，影响二次销售商品已经拆封，影响二次销售商品已经拆封，影响二次销售
			</view>
		</view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                type: 1,
            };
        },
        onLoad() {
            
        },
        methods: {
			toPay(item) {
				
			},
			
			// 立即评价
			toRate(item) {
				this.$gTo(`./write?id=${item.id}`)
			},
			
			// 售后
			toAfter(item) {
				this.$gTo(`./after?id=${item.id}`)
			},
			
			// 查看物流
			toLogistics(item) {
				this.$gTo(`./logistics?id=${item.id}`)
			},
			
			// 完善快递信息
			toExpress(item) {
				this.$gTo(`./write?id=${item.id}`)
			},
			
			// 取消订单
			toCancel(item) {
				this.$gTo(`./cancel?id=${item.id}`)
			},
			
			// 去详情
			toDetails(item) {
				this.$gTo(`./details?id=${item.id}`)
			},
			
			chooseNav(num) {
				this.type = num
			},
        }
    };
</script>

<style lang="scss">
	
	
    page{
        background-color: #f5f5f5;
    }
    .nav{
    	display: flex;
    	justify-content: space-between;
    	align-items: center;
    	background-color: #fff;
		margin-bottom: 24rpx;
    }
    .nav-i{
    	width: calc(100vw / 6);
    	text-align: center;
    	font-size: 30rpx;
    	padding: 25rpx 0;
    }
    .active{
    	color: #2558ab;
    	position: relative;
    }
    .active::after{
    	display: block;
    	content: '';
    	width: 32rpx;
    	height: 8rpx;
    	background-color: #2558ab;
    	position: absolute;
    	bottom: 0;
    	left: 50%;
    	transform: translateX(-50%);
    }
	
	
	.gift{
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		padding-top: 8rpx;
	}
	.gift-icon{
		width: 29rpx;
		height: 29rpx;
		font-size: 20rpx;
		color: #fff;
		text-align: center;
		line-height: 29rpx;
		background-color: #fe4a26;
		border-radius: 6rpx;
		margin-right: 4rpx;
	}
	.gift-text{
		flex: 1;
		font-size: 24rpx;
		color: #7d7d7d;
	}
	
	
	.box{
		background-color: #fff;
		border-radius: 20rpx;
		padding: 0 18rpx 34rpx;
		margin: 0 10rpx 24rpx;
	}
	.item{
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		padding-top: 35rpx;
	}
	.img{
		width: 180rpx;
		height: 180rpx;
		border: 2rpx solid #e6e6e6;
		border-radius: 10rpx;
		margin-right: 20rpx;
	}
	.item-right{
		flex: 1;
		padding-bottom: 35rpx;
		border-bottom: 2rpx solid #e6e6e6;
	}
	.name{
		font-size: 30rpx;
		font-weight: bold;
		padding-top: 8rpx;
		width: 495rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.sub{
		font-size: 26rpx;
		color: #7d7d7d;
		padding-top: 6rpx;
		width: 495rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.item-d{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-top: 8rpx;
	}
	.price{
		font-size: 24rpx;
	}
	.price-num{
		font-size: 32rpx;
		font-weight: bold;
	}
	.t-price{
		padding-top: 20rpx;
		font-size: 24rpx;
		text-align: right;
	}
	.t-price-num{
		font-size: 38rpx;
		font-weight: bold;
	}
	.down{
		padding-top: 18rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.sta{
		padding: 4rpx 12rpx;
		border-radius: 6rpx;
		font-size: 26rpx;
		color: #ff4e00;
		background-color: #fff3ee;
	}
	.sta2{
		color: #08af56;
		background-color: #eff7f3;
	}
	.sta3{
		color: #4d4d4d;
		background-color: #eaeaea;
	}
	.btn1{
		font-size: 28rpx;
		padding: 10rpx 22rpx;
		border-radius: 50rpx;
		border: 2rpx solid #dcdcdc;
		box-sizing: border-box;
		margin-left: 20rpx;
	}
	.btn2{
		font-size: 28rpx;
		padding: 10rpx 22rpx;
		border-radius: 50rpx;
		border: 2rpx solid #f76d0a;
		box-sizing: border-box;
		margin-left: 20rpx;
		color: #f76d0a;
	}
	.reason{
		font-size: 24rpx;
		color: #868686;
		padding-top: 8rpx;
	}
	

</style>
